From 569c38cdb708c3c56787c1cfcd18a3e01c691e11 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Thu, 18 Jul 2013 03:10:00 +0000 Subject: [PATCH] Avoid implicit time_t conversion in waypt_add that would result in creation_time being zeroed. --- gpsbabel/waypt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/waypt.cc b/gpsbabel/waypt.cc index 176965ab0..dbb7ea686 100644 --- a/gpsbabel/waypt.cc +++ b/gpsbabel/waypt.cc @@ -158,7 +158,7 @@ waypt_add(waypoint *wpt) if ((wpt->longitude < -180) || (wpt->longitude > 180.0)) fatal("Invalid longitude %f in waypoint %s.\n", lon_orig, wpt->shortname ? wpt->shortname : ""); - if (wpt->creation_time < 0) { + if (!wpt->creation_time.isValid()) { warning("%s: Invalid timestamp in waypoint %s.\n", wpt->session->name, wpt->shortname ? wpt->shortname : ""); -- 2.30.2